import request from '.'
interface LoginParams {
  username: string,
  password: string,
  captcha_id: string,
  captcha_code: string
}

export const loginApi = (data:LoginParams) => {
  return request.post('/auth/login',data)
}

export const getCaptcha =async ()=>{
  const result =await request.get('/auth/captcha')
  return result
}

export const logoutApi = ()=>{
  return request.post('/auth/logout')
}

